package com.caiyigo.baihua.dto;

/**
 * @author Administrator
 *
 */
public class Result {
	private boolean success;
	private Object data;

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public Result() {
	}

	public Result(boolean success, Object data) {
		super();
		this.success = success;
		this.data = data;

	}

	public Result(boolean success) {
		super();
		this.success = success;
		if (!success) {
			this.data = ErrorMessages.defaultMessage;
		}
	}

	public static final class ErrorMessages {
		public static final String defaultMessage = "系统错误,操作失败!";
	}
}
